<form method="post" action=".">
<table>
{{ form }}
</table>

<input type="submit" value="login" />
<input type="hidden" name="next" value="{{ next }}" />
</form>